package com.wpt.main.vo;


/**
 *	文件对象POJO
 *  @author   xinqh
 *  @Date	  2011-3-29  下午09:43:57
 */
public class FileObject {

	private String id;
	private String name;
	private String path;
	private String leaf;//0:文件夹   1：文件
	private String suffix;//后缀名
	private String picture;//显示文件时图形的类型
	private String length;//大小
	private String type;//类型
	private String modifyTime;//修改时间
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getLeaf() {
		return leaf;
	}
	public void setLeaf(String leaf) {
		this.leaf = leaf;
	}
	public String getSuffix() {
		return suffix;
	}
	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}
	public String getPicture() {
		return picture;
	}
	public void setPicture(String picture) {
		this.picture = picture;
	}
	
	public String getLength() {
		return length;
	}
	public void setLength(String length) {
		this.length = length;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}
	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder();
		
		appendProperty(sb,"id",id);
		appendProperty(sb,"name",name);
		appendProperty(sb,"path",path);
		appendProperty(sb,"leaf",leaf);
		appendProperty(sb,"suffix",suffix);
		appendProperty(sb,"picture",picture);
		appendProperty(sb,"length",length);
		appendProperty(sb,"type",type);
		appendProperty(sb,"modifyTime",modifyTime);
		return sb.toString();
	}
	
	private void appendProperty(StringBuilder sb,String key,String property){
		if(property!=null){
			sb.append(" "+key+"=\""+property+"\"");
		}
	}
}

